package br.ufrj.dcc.comp2.musica.vista;

import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JPanel;

import br.ufrj.dcc.comp2.musica.listeners.ListenerCadastrarPessoa;

public class PainelBotoesCadastrarAluno extends JPanel{


	private static final long serialVersionUID = 1L;
	JButton botaoCadastrarAluno;
	
	
	GridBagConstraints gridBagConstraints;
	
	
	public PainelBotoesCadastrarAluno(ListenerCadastrarPessoa ouvinte) {
		
		
		botaoCadastrarAluno = new JButton("Cadastrar");
		botaoCadastrarAluno.addActionListener(ouvinte);
		
		
		
		
		this.setLayout(new GridBagLayout());
		gridBagConstraints = new GridBagConstraints();
		gridBagConstraints.insets = new Insets(0, 10, 0, 10);
		
		adicionar(botaoCadastrarAluno, 0, 0);
		
		
		
				
	}
	
	public void adicionar(Component c, int x, int y) {
		
		gridBagConstraints.gridx = x;
		gridBagConstraints.gridy = y;
	
		add(c, gridBagConstraints);
	}

	public JButton getBotaoCadastrarAluno() {
		return botaoCadastrarAluno;
	}
}
